#ifndef WIDGET_H
#define WIDGET_H

#include <memory>
#include <QWidget>
#include <QSystemTrayIcon>
#include <QAction>
#include <QMenu>

class QPushButton;
class QxtGlobalShortcut;
class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);

protected:
    void closeEvent(QCloseEvent *event);

protected slots:
    void onScreenshot();
    void iconActivated(QSystemTrayIcon::ActivationReason reason);

private:
    void CreatTrayMenu();
    void CreatTrayIcon();

private:
    std::shared_ptr<QPushButton> openScreenshotButton_;
    std::shared_ptr<QPushButton> closeScreenshotButton_;

    QSystemTrayIcon *myTrayIcon;

    QMenu *myMenu;

    QAction *miniSizeAction;
    QAction *maxSizeAction;
    QAction *restoreWinAction;
    QAction *quitAction;
};

#endif // WIDGET_H
